﻿<?php
require_once("conn.php");//引用数据库链接文件
$tm = $_GET['time']; //GET方法为URL参数传递

//echo "time: " .$tm." <br>";

// $sql = "SELECT * FROM rx_wnan WHERE `time` = '2019-03-31 12:12:13'";
$sql = "SELECT * FROM rx_wnan WHERE time > '$tm'";

//echo "sql " .$sql ." <br>";

//$sql = "SELECT * FROM rx_wnan WHERE `time` > '. $tm .'";
// $sql = "SELECT id, firstname, lastname FROM MyGuests";
$result = mysql_query($sql); //借SQL语句插入数据
 

if ( mysql_num_rows($result) > 0) {
    // 输出数据
    while( $row = mysql_fetch_assoc( $result ) ) {

//        echo "time: " . $row["time"]. " - wnan: " . $row["wnan"]. " " . $row["time"]. "<br>";
          echo "" . $row["wnan"]. "<br>";
    }
} else {
    echo "0 结果";
}

mysql_close();//关闭MySQL连接
?>